![]() | ![]() | ![]() | ![]() |
When a SAS® data set is created as the output of PROC SORT and the data set contains zero observations, the data set might not be marked as sorted. When the output of the CONTENTS procedure is examined, the SORTED value can be YES or NO.
The PROC CONTENTS SORTED value depends on how the data set is created.
If the data is created with code similar to:
data foo; input x y; cards; 1 2 3 4 5 6 ; run; proc sort data=foo out=bar; by x; where y < 1; run;
Then SORTED will be equal to YES. If the data set is created with code similar to:
data foo; input x y; cards; ; run; proc sort data=foo out=bar; by x; run;
Then SORTED will be equal to NO. The only way to get the SORTED value to YES is to use the SORTEDBY data set option in the SORT procedure, as in the following example:
data foo; input x y; cards; ; run; proc sort data=foo out=bar(sortedby=x); by x; run;
The output of PROC CONTENTS will have SORTED equal to YES, but the Sort Information section will have VALIDATED equal to NO.
This behavior has occurred since at least SAS 6.12.
The problem is fixed at SAS 9.3 TS1M0.
Product Family | Product | System | SAS Release | |
Reported | Fixed* | |||
SAS System | Base SAS | z/OS | 8.2 TS2M0 | 9.3 TS1M0 |
OpenVMS VAX | 8.2 TS2M0 | 9.3 TS1M0 | ||
Microsoft Windows Server 2003 Datacenter Edition | 8.2 TS2M0 | 9.3 TS1M0 | ||
Microsoft Windows Server 2003 Enterprise Edition | 8.2 TS2M0 | 9.3 TS1M0 | ||
Microsoft Windows Server 2003 Standard Edition | 8.2 TS2M0 | 9.3 TS1M0 | ||
Microsoft Windows XP Professional | 8.2 TS2M0 | 9.3 TS1M0 | ||
64-bit Enabled AIX | 8.2 TS2M0 | 9.3 TS1M0 | ||
64-bit Enabled HP-UX | 8.2 TS2M0 | 9.3 TS1M0 | ||
64-bit Enabled Solaris | 8.2 TS2M0 | 9.3 TS1M0 | ||
ABI+ for Intel Architecture | 8.2 TS2M0 | 9.3 TS1M0 | ||
AIX | 8.2 TS2M0 | 9.3 TS1M0 | ||
HP-UX | 8.2 TS2M0 | 9.3 TS1M0 | ||
IRIX | 8.2 TS2M0 | 9.3 TS1M0 | ||
Linux | 8.2 TS2M0 | 9.3 TS1M0 | ||
OpenVMS Alpha | 8.2 TS2M0 | 9.3 TS1M0 | ||
Solaris | 8.2 TS2M0 | 9.3 TS1M0 | ||
Tru64 UNIX | 8.2 TS2M0 | 9.3 TS1M0 |